/*
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-10-18 23:52:08
 * @LastEditTime: 2019-10-19 10:36:31
 * @LastEditors: Please set LastEditors
 */

// 导入vuex
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex) //必须有这一行，否则报错

const state = {
    userinfo: {},
    num: 11
}
const mutations = {
        save_admin(state, userinfo) {
            state.userinfo = userinfo;
            console.log('赋值后的用户信息', state.userinfo)
        }
    }
    // console.log(userinfo)
    // 创建一个store实例
export default new Vuex.Store({
    state,
    mutations
})